﻿
IF EXISTS (SELECT * FROM sys.views WHERE name = 'V_UDF_MD_MATERIAL')
BEGIN
    DROP VIEW [dbo].[V_UDF_MD_MATERIAL]
END
GO

CREATE  VIEW V_UDF_MD_MATERIAL AS
select 
cInvCode,cInvName,dModifyDate,cInvStd,cComUnitName,cDefWareHouse,
bFree1,bFree2,bFree3,bFree4,bFree5,bFree6,bFree7,bFree8,bFree9,bFree10
from Inventory a left join computationUnit b on a.cComUnitCode =b.cComUnitCode;

GO